<?php

// $Id$

require_once(TANGRA_MAIN_DIR.'form/guardable_form.class.php');
require_once(TANGRA_MAIN_DIR.'form/fields/select/form_field_select.class.php');
require_once(TANGRA_MAIN_DIR.'/form/static_html_form_generator.class.php');


class Settings_Sitemap_Form extends Guardable_Form {
	function __construct() {
		parent::__construct('settings_sitemap', 'admin/modules/tangra_cms/settings/settings_sitemap_edit.php');

		$f_mode = new Form_Field_Select('mode', 0, true);
		$f_mode->add_option(0);
		$f_mode->add_option(1);
		$this->add_field($f_mode);

		$f_weight = new Form_Field_Select('weight', '0.5', true);
		$f_weight->add_option('0.0');
		$f_weight->add_option('0.1');
		$f_weight->add_option('0.2');
		$f_weight->add_option('0.3');
		$f_weight->add_option('0.4');
		$f_weight->add_option('0.5');
		$f_weight->add_option('0.6');
		$f_weight->add_option('0.7');
		$f_weight->add_option('0.8');
		$f_weight->add_option('0.9');
		$f_weight->add_option('1.0');
		$this->add_field($f_weight);

		$f_change_freq = new Form_Field_Select('change_freq', '4', true);
		$f_change_freq->add_option('0');
		$f_change_freq->add_option('1');
		$f_change_freq->add_option('2');
		$f_change_freq->add_option('3');
		$f_change_freq->add_option('4');
		$f_change_freq->add_option('5');
		$f_change_freq->add_option('6');
		$this->add_field($f_change_freq);

	}


	public function generate_html() {
		$html_gen = new Static_HTML_Form_Generator($this, 'modules/form_html_tpl_static_ajax_metallic_en', 'en');
		$html_gen->create_default_tpl_maps();

		printbr('<pre>');
		printbr(htmlentities($html_gen->get_static_html()));
		printbr('</pre>');
	}
}
